﻿ {
    Title: "BBCode markup syntax parser",
    Remarks: "Parse the BBCode syntax and render to XHTML",
    Markups:
    [
{
    Name: "Bold",
    Syntax: "[b]{0}[/b]",
    Remarks: "Bold font style.",
    Match: "\\[b\\](.+?)\\[\\/b\\]",
    Replacement: "<strong>$1</strong>",
    Icon: "ui-rtb-icon ui-rtb-icon-bold"
},
{
    Name: "Italic",
    Syntax: "[i]{0}[/i]",
    Remarks: "Italic font style.",
    Match: "\\[i\\](.+?)\\[\\/i\\]",
    Replacement: "<i>$1</i>",
    Icon: "ui-rtb-icon ui-rtb-icon-italic"
},
{
    Name: "Underline",
    Syntax: "[u]{0}[/u]",
    Remarks: "Underline font style.",
    Match: "\\[u\\](.+?)\\[\\/u\\]",
    Replacement: "<u>$1</u>",
    Icon: "ui-rtb-icon ui-rtb-icon-underline"
},
{
    Syntax: "[url]{0}[/url]",
    Remarks: "Url link display the raw url",
    Match: "\\[url\\](.+?)\\[\\/url\\]",
    Replacement: "<a href='$1'>$1</a>"
},
{
    Name: "Link",
    Syntax: "[url={0}]{1}[/i]",
    Remarks: "Url link display the specified text.",
    Match: "\\[url=(.*)\\](.+?)\\[\\/url\\]",
    Replacement: "<a href='$1'>$2</a>",
    Icon: "ui-rtb-icon ui-rtb-icon-link"
},
{
    Name: "Image",
    Syntax: "[img]{0}[/img]",
    Remarks: "Image tag.",
    Match: "\\[img\\](.+?)\\[\\/img\\]",
    Replacement: "<img src=\"$1\" />",
    Icon: "ui-rtb-icon ui-rtb-icon-image"
},
{
    Name: "Quote",
    Syntax: "[quote]{0}[/quote]",
    Remarks: "Quote the specified text.",
    Match: "\\[quote\\](.+?)\\[\\/quote\\]",
    Replacement: "<div class='ui-state-highlight ui-corner-all' style='padding:10px;margin:5px'>$1</div>",
    Icon: ""
},
{
    Name: "FontSize",
    Syntax: "[size={0}]{1}[/size]",
    Remarks: "Specified the text style.",
    Match: "\\[size=(.*)\\](.+?)\\[\\/size\\]",
    Replacement: "<span style=\"font-size:$1px;\">$2</span>",
    Icon: "ui-rtb-icon ui-rtb-icon-increaseFontSize"
},
{
    Name: "FontColor",
    Syntax: "[color={0}]{1}[/color]",
    Remarks: "The color text.",
    Match: "\\[color=(.*)\\](.+?)\\[\\/color\\]",
    Replacement: "<span style=\"color:$1;\">$2</span>",
    Icon: "ui-rtb-icon ui-rtb-icon-color"
},
{
    Name: "H1",
    Syntax: "[h1]{0}[/h1]",
    Remarks: "Header1 style.",
    Match: "\\[h1\\](.+?)\\[\\/h1\\]",
    Replacement: "<h1>$1</h1>",
    Icon: "ui-rtb-icon ui-rtb-icon-h1"
},
{
    Name: "H2",
    Syntax: "[h2]{0}[/h2]",
    Remarks: "Header2 style.",
    Match: "\\[h2\\](.+?)\\[\\/h2\\]",
    Replacement: "<h2>$1</h2>",
    Icon: "ui-rtb-icon ui-rtb-icon-h2"
},
{
    Name: "H3",
    Syntax: "[h3]{0}[/h3]",
    Remarks: "Header3 style.",
    Match: "\\[h3\\](.+?)\\[\\/h3\\]",
    Replacement: "<h3>$1</h3>",
    Icon: "ui-rtb-icon ui-rtb-icon-h3"
},
{
    Name: "H4",
    Syntax: "[h4]{0}[/h4]",
    Remarks: "Header4 style.",
    Match: "\\[h4\\](.+?)\\[\\/h4\\]",
    Replacement: "<h4>$1</h4>",
    Icon: "ui-rtb-icon ui-rtb-icon-h4"
},
{
    Name: "H5",
    Syntax: "[h5]{0}[/h5]",
    Remarks: "Header5 style.",
    Match: "\\[h5\\](.+?)\\[\\/h5\\]",
    Replacement: "<h5>$1</h5>",
    Icon: "ui-rtb-icon ui-rtb-icon-h5"
},
{
    Name: "H6",
    Syntax: "[h6]{0}[/h6]",
    Remarks: "Header6 style.",
    Match: "\\[h6\\](.+?)\\[\\/h6\\]",
    Replacement: "<h6>$1</h6>",
    Icon: "ui-rtb-icon ui-rtb-icon-h6"
},
{
    Name: "Code",
    Syntax: "[code={0}]{1}[/code]",
    Remarks: "The code style.",
    Match: "\\[code=(.+?)\\]((.|\\n|\\r)+?)\\[\\/code\\]",
    Replacement: "<script type=\"text/$1\">$2</script>"
}
]
}